using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using DatabaseManager;

namespace DataBaseManagerTest
{
	public partial class Mainframe : Form
	{
		Hashtable databaseTable = new Hashtable();
		Hashtable recordTable = new Hashtable();

		int databaseIndex = 0;

		public Mainframe()
		{
			InitializeComponent();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			string path = "Nwind.mdb";
			//basic database reading 

			//create request comes with database type and path 
			DatabaseObjectBase database = DatabaseObjectFactory.CreateDatabaseObject(DatabaseObjectType.AccessDatabase);
			database.ObjectIndex = this.databaseIndex++;
			database.InitiateDatabaseConnection(path, database.ObjectIndex);

			//add database instance to the table
			databaseTable.Add(database.ObjectIndex, database);

			//read record from database

		}
	}
}